namespace Core.Domain
{
    public class PositionInText
    {
        public readonly int Column;
        public readonly int Row;

        public PositionInText(int row, int column)
        {
            Row = row;
            Column = column;
        }

        public override int GetHashCode()
        {
            return (Row + int.MaxValue*Column).GetHashCode();
        }

        public override bool Equals(object obj)
        {
            var other = obj as PositionInText;
            if (other == null)
            {
                return false;
            }
            return other.Row == Row && other.Column == Column;
        }
    }
}